package com.fanketly.musicdiary.data.db

import androidx.room.*
import com.fanketly.musicdiary.data.model.MusicModel
import kotlinx.coroutines.flow.Flow

@Dao
interface MusicDao {
    @Query("select * from music")
    fun getAll(): Flow<List<MusicModel>>

    @Insert(onConflict = OnConflictStrategy.IGNORE)
    suspend fun insert(model: MusicModel): Long

    @Update
    suspend fun update(model: MusicModel)

}
